package com.neusoft.controller.registration;

import com.neusoft.bean.MedicalTechnologyIdsBean;
import com.neusoft.service.CheckRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@CrossOrigin
@RequestMapping("/checkrequests")
public class CheckRequestControll {
    @Autowired
    CheckRequestService checkRequestService;

    //退费
    @PutMapping("/charge")
    public void charge( @RequestBody MedicalTechnologyIdsBean medicalTechnologyIdsBean ){
        checkRequestService.charge(medicalTechnologyIdsBean);
    }

    //收费
    @PutMapping("/takeCharge")
    public void takeCharge( @RequestBody MedicalTechnologyIdsBean medicalTechnologyIdsBean ){
        checkRequestService.takeCharge(medicalTechnologyIdsBean);
    }

    //检查项目管理
    @GetMapping("/checkItem")
    public List<Map<String, Object>> checkItem(@RequestParam String realName){
        List<Map<String,Object>> list=checkRequestService.checkItem(realName);
        return list;
    }
}
